#pragma once

namespace solar::cuda::inter_op
{
    struct alignas(16) Float4
    {
            float x;
            float y;
            float z;
            float w;
    };

    struct Float3
    {
            float x;
            float y;
            float z;
    };

    struct alignas(8) Float2
    {
            float x;
            float y;
    };

    struct alignas(8) Int2
    {
            int x;
            int y;
    };

    struct Int3
    {
            int x;
            int y;
            int z;
    };

    struct alignas(16) Int4
    {
            int x;
            int y;
            int z;
            int w;
    };

    struct alignas(4) Uchar4
    {
            unsigned char x;
            unsigned char y;
            unsigned char z;
            unsigned char w;
    };

    enum class GridType : char
    {
        kRectangleGrid,
    };

    enum class SubCenterType : char
    {
        Square,
        Poisson
    };

    constexpr const auto kEpsilon = 1e-6;
    constexpr const auto kMaxThreads = 1024;
    constexpr const auto kMaxAllThreads = 0x40000000000;
    constexpr const auto kMaxBlockSingleDim = 0x0ffff;
    constexpr const auto kMathPi = 3.141592654;
} // namespace solar::cuda::inter_op

#ifdef SOLAR_USE_CUDA_INTER_OP_DATA
namespace solar
{
    using solar::cuda::inter_op::Float2;
    using solar::cuda::inter_op::Float3;
    using solar::cuda::inter_op::Float4;
    using solar::cuda::inter_op::Int2;
    using solar::cuda::inter_op::Int3;
    using solar::cuda::inter_op::Int4;
    using solar::cuda::inter_op::Uchar4;
} // namespace solar
#endif

// minimal import of CUDA's driver_types.h

#if !defined(__DRIVER_TYPES_H__)
struct CUstream_st;
using cudaStream_t = struct CUstream_st*;
#endif
